<meta title="PLUS商品审核" args="id" width="600px" />
<form class="p" id="form" s="form,nda,datac,valid" method="put" action="/api/sellerPromotionItem/verify/{id}">
    <table class="table table-bordered table-stripped">
        <tr>
            <th>审核结果：</th>
            <td>
                <select class="form-control" s-valid-error="require()"
                        s="select"
                        id="success"
                        name="success">
                    <option value="true">通过</option>
                    <option value="false">拒绝</option>
                </select>
            </td>
        </tr>
        <tr>
            <th>审核备注：</th>
            <td>
                <textarea id="verifyRemark" class="form-control" rows="5" name="verifyRemark"></textarea>
            </td>
        </tr>
    </table>
</form>

<script>
    S.meta.btns = [
        {
            name: "确认",
            style: "btn btn-primary",
            click: function() {
                if($success.node.val() == 'false' && $verifyRemark.node.val().trim() == "") {
                    S.toast("请输入审核备注", 'warning');
                    return;
                }
                return $form.submit().done(function(rs) {
                    S.close(rs);
                })
            }
        },
        {
            name: "取消",
            style: "btn btn-default",
            click: function() {
                S.close();
            }
        }
    ]
</script>